Monads for Functional Programming
نویسنده
چکیده
The use of monads to structure functional programs is de scribed Monads provide a convenient framework for simulating e ects found in other languages such as global state exception handling out put or non determinism Three case studies are looked at in detail how monads ease the modi cation of a simple evaluator how monads act as the basis of a datatype of arrays subject to in place update and how monads can be used to build parsers
منابع مشابه
Combining Monads
Monads provide a way of structuring functional programs. Most real applications require a combination of primitive monads. Here we describe how some monads may be combined with others to yield a combined monad.
متن کاملExtensions: A Technique for Structuring Functional-Logic Programs
Monads are a technique widely used in functional programming languages to address many different problems. This paper presents extensions, a functional-logic programming technique that constitutes an alternative to monads in several situations. Extensions permit the definition of easily reusable functions in the same way as monads, but are based on simpler concepts taken from logic programming,...
متن کاملRelative Monads Formalised
Relative monads (Altenkirch, Chapman, and Uustalu 2010) are a recent generalisation of ordinary monads to cover similar structures where the underlying functor need not be an endofunctor. Our interest in this generalisation was triggered by some structures from programming theory that, in many ways, are strikingly similar to monads (even respecting the same laws), have similar programming appli...
متن کاملMonad Factory: Type-Indexed Monads
Monads provide a greatly useful capability to pure languages in simulating side-effects, but implementations such as the Monad Transformer Library [1] in Haskell prohibit reuse of those side-effects such as threading through two different states without some explicit workaround. Monad Factory provides a straightforward solution for opening the non-proper morphisms by indexing monads at both the...
متن کاملCS 6110 Lecture 36 A Monadic Approach to
It is also possible to define monads in terms of two other operations, map : (D → E) → M(D) → M(E) and join : M(M(D))→M(D). This is often the approach taken in category theory, but the definitions are equivalent. We use the notation [σ] to denote unit(σ), and the notation f∗(m) to denote bind(f)(m). Monads figure heavily in the programming language Haskell, which uses monads as a way to introdu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1992